import axios from "axios"
import brandsUrls from "../../urls/product/brands"

export default {
  // 获取所有品牌
  fetchGetBrandsByPage (params) {
    return axios.post(brandsUrls.getBrandsByPage, params)
  },
  // 添加品牌
  fetchAddBrands (data) {
    return axios.post(brandsUrls.addBrands, data)
  },
  // 修改品牌
  fetchEditBrands (data) {
    return axios.post(brandsUrls.editBrands, data)
  },
  // 批量禁用/解禁
  fetchBatchChangeState (data) {
    return axios.post(brandsUrls.batchChangeState, data)
  },
  // 校验品牌是否唯一
  fetchCheckBrands (data) {
    return axios.post(brandsUrls.checkBrands + "?" + data)
  },
  // 获取所有类型
  fetchGetAllBrands () {
    return axios.post(brandsUrls.getAllBrands)
  }
}
